package com.itheima.controller;

import com.itheima.pojo.Catemater;
import com.itheima.service.CatematerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CatematerController {
//第一题
    @Autowired
    private CatematerService catematerService;

    @GetMapping("/catemater")
    public List<Catemater> findAll(){
        return catematerService.findAll();
    }
}
